import http from "@/common/http/interface";
import {
  mapGetters,
  mapActions
} from 'vuex';
let httpUrl = http.config.baseUrl + 'api/v1/'
export default {
  // 获取菜单栏
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8119165835359370
  getMenuList: data => {
    return http.request({
      url: httpUrl + "menu/get.menu.list",
      method: "post",
      data
    });
  },
  // 获取文件上传token
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8137034784957773
  getUploadToken: data => {
    return http.request({
      url: httpUrl + "upload/get.upload.token",
      method: "post",
      data
    });
  },
  // 获取系统配置信息
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8117238298256283
  getSettingInfo: data => {
    return http.request({
      url: httpUrl + "setting/get.setting.info",
      method: "post",
      data
    });
  },
  // 获取广告图
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8178658295120696
  getAdsCode: data => {
    return http.request({
      url: httpUrl + "ads/get.ads.code",
      method: "post",
      data
    });
  },
  // 获取客服
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8166044991123451
  getStaff: data => {
    return http.request({
      url: httpUrl + "staff/get.staff",
      method: "get",
      data
    });
  },
  // 检测APP版本升级
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8196148291804678
  appUpdated: data => {
    return http.request({
      url: httpUrl + "app_install/query.app.install.updated",
      method: "post",
      data
    });
  },
}
